package com.zhenzhen.xszhcp.serviceImpl;

import com.zhenzhen.xszhcp.mapper.ClassesMapper;
import com.zhenzhen.xszhcp.model.Classes;
import com.zhenzhen.xszhcp.service.ClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class ClassesServiceImpl implements ClassesService {
    @Autowired
    private ClassesMapper mapper;
    @Override
    public List<Classes> getClassesList(Map paramMap) {
        return mapper.getClassesList(paramMap);
    }

    @Override
    public Classes getClassesById(int id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertClasses(Classes classes) {
        return mapper.insertSelective(classes);
    }

    @Override
    public int delClasses(int id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int upClasses(Classes classes) {
        return mapper.updateByPrimaryKeySelective(classes);
    }
}
